<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>登录</title>
    <base href="http://${pageContext.request.serverName}:${pageContext.request.serverPort}${pageContext.request.contextPath}/">
    <link rel="stylesheet" href="static/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="static/css/font-awesome.min.css">
    <link rel="stylesheet" href="static/css/login.css">
    <script src="static/jquery/jquery-2.1.1.min.js"></script>
    <script src="static/bootstrap/js/bootstrap.min.js"></script>
    <script src="static/layer/layer.js"></script>
    <%-- 如果在已登录的情况下访问登录页，直接跳转到main--%>
    <c:if test="${sessionScope.loginAdmin != null}">
        <script>
            location.href = "admin/to/main/page.html";
        </script>
    </c:if>
</head>
<body>
    <nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
        <div class="container">
            <div class="navbar-header">
                <div>
                    <a class="navbar-brand" href="index.html" style="font-size:32px;">
                        尚筹网-创意产品众筹平台
                    </a>
                </div>
            </div>
        </div>
    </nav>
    <div class="container">
        <form action="admin/do/login.html" method="post" class="form-signin" role="form">
            <h2 class="form-signin-heading">
                <i class="glyphicon glyphicon-log-in"></i> 管理员登录
            </h2>
            <p style="color: red">${SPRING_SECURITY_LAST_EXCEPTION.message}</p>
            <div class="form-group has-success has-feedback">
                <input type="text" name="account" class="form-control" placeholder="请输入登录账号" autofocus>
                <span class="glyphicon glyphicon-user form-control-feedback"></span>
            </div>
            <div class="form-group has-success has-feedback">
                <input type="password" name="password" class="form-control" placeholder="请输入登录密码" style="margin-top:10px;">
                <span class="glyphicon glyphicon-lock form-control-feedback"></span>
            </div>
            <input type="submit" value="登录" class="btn btn-lg btn-success btn-block">
        </form>
    </div>
</body>
</html>